package autosimmune.zones.styles;

import java.awt.Color;
import java.awt.Paint;

import repast.simphony.valueLayer.ValueLayer;
import repast.simphony.visualization.visualization2D.style.ValueLayerStyle;

public class TissueLayerStyle implements ValueLayerStyle{

	private ValueLayer vl;
	
	@Override
	public void addValueLayer(ValueLayer layer) {
		vl = layer;
		System.out.println(layer.getName());
	}

	@Override
	public int getBlue(double... coordinates) {
		return 0;
	}

	@Override
	public float getCellSize() {
		return 10;
	}

	@Override
	public int getGreen(double... coordinates) {
		return 0;
	}

	@Override
	public Paint getPaint(double... coordinates) {
		int v = (int) vl.get(coordinates);
		if (v > 255) return new Color(255,0,0,255);
		return new Color(v, 0, 0, 255);	
	}

	@Override
	public int getRed(double... coordinates) {
		return 0;
	}

}
